package com.nyist.health.aop;


import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.Collections;

/**
 * @description ：AOP日志
 * @version: 1.0
 */
@Slf4j
@Component
@Aspect
public class LogAdvice {

    @Before("execution(* com.nyist.health.controller.*.*(..))")
    public void beforeMethod(JoinPoint joinPoint) {

        log.debug("##{}:{}->{}", joinPoint.getTarget().getClass(), joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
    }
}
